//
//  GalleriesMainModel.m
//  ArtDog
//
//  Created by dllo on 16/9/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "GalleriesMainModel.h"
#import "GalleryVos.h"

@implementation GalleriesMainModel

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"allGalleryVos"] || [key isEqualToString:@"recommendGalleryVos"]) {
        NSMutableArray<GalleryVos *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            GalleryVos *galleryModel = [GalleryVos modelWithDic:dic];
            [array addObject:galleryModel];
        }
        if ([key isEqualToString:@"recommendGalleryVos"]) {
            _recommendGalleryVos = array;
        } else {
            _allGalleryVos = array;
        }
        
    }
}

@end
